package 空格替换;

public class Solution {
    public static void main(String[] args) {
        Solution solution = new Solution();
        System.out.println(solution.replaceSpace("We are happy."));
    }
    public String replaceSpace(String s) {
        s = s.replaceAll(" ","%20");
        return s;
    }
}
